home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998…eptember: Technology Seed / September 98 ADC Seed CD.toast / FireWire 1.1 DR2 SDK / Source / OpenTransport / Interfaces / dlpi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-15  |  38.6 KB  |  1,221 lines  |  [TEXT/MPS ]

  1. /** Copyright (c) 1993  Mentat Inc.
  2.  ** dlpi.h 4.2, last change 15 Jun 1994
  3.  **/
  4.  
  5. #ifndef _SYS_DLPI_H
  6. #define _SYS_DLPI_H
  7.  
  8. #if PRAGMA_ALIGN_SUPPORTED
  9.     #if GENERATING68K
  10.     #pragma options align=mac68k
  11.     #endif
  12.     #if GENERATINGPOWERPC
  13.     #pragma options align=power
  14.     #endif
  15. #endif
  16.  
  17. /*
  18.  * dlpi.h header for Data Link Provider Interface
  19.  */
  20.  
  21. /*
  22.  * This header file has encoded the values so an existing driver
  23.  * or user which was written with the Logical Link Interface(LLI)
  24.  * can migrate to the DLPI interface in a binary compatible manner.
  25.  * Any fields which require a specific format or value are flagged
  26.  * with a comment containing the message LLI compatibility.
  27.  */
  28.  
  29. /*
  30.  *    DLPI revision definition history
  31.  */
  32. #define DL_CURRENT_VERSION    0x02    /* current version of dlpi */
  33. #define DL_VERSION_2        0x02    /* version of dlpi March 12,1991 */
  34.  
  35. /*
  36.  * Primitives for Local Management Services
  37.  */
  38. #define DL_INFO_REQ         0x00    /* Information Req, LLI compatibility */
  39. #define DL_INFO_ACK         0x03    /* Information Ack, LLI compatibility */
  40. #define DL_ATTACH_REQ        0x0b    /* Attach a PPA */
  41. #define DL_DETACH_REQ        0x0c    /* Detach a PPA */
  42. #define DL_BIND_REQ         0x01    /* Bind dlsap address, LLI compatibility */
  43. #define DL_BIND_ACK         0x04    /* Dlsap address bound, LLI compatibility */
  44. #define DL_UNBIND_REQ        0x02    /* Unbind dlsap address, LLI compatibility */
  45. #define DL_OK_ACK            0x06    /* Success acknowledgment, LLI compatibility */
  46. #define DL_ERROR_ACK        0x05    /* Error acknowledgment, LLI compatibility */
  47. #define DL_SUBS_BIND_REQ    0x1b    /* Bind Subsequent DLSAP address */
  48. #define DL_SUBS_BIND_ACK    0x1c    /* Subsequent DLSAP address bound */
  49. #define DL_SUBS_UNBIND_REQ    0x15    /* Subsequent unbind */
  50. #define DL_ENABMULTI_REQ    0x1d    /* Enable multicast addresses */
  51. #define DL_DISABMULTI_REQ    0x1e    /* Disable multicast addresses */
  52. #define DL_PROMISCON_REQ    0x1f    /* Turn on promiscuous mode */
  53. #define DL_PROMISCOFF_REQ    0x20    /* Turn off promiscuous mode */
  54.  
  55. /*
  56.  * Primitives used for Connectionless Service
  57.  */
  58. #define DL_UNITDATA_REQ     0x07    /* datagram send request, LLI compatibility */
  59. #define DL_UNITDATA_IND     0x08    /* datagram receive indication, LLI compatibility */
  60. #define DL_UDERROR_IND        0x09    /* datagram error indication, LLI compatibility */
  61. #define DL_UDQOS_REQ        0x0a    /* set QOS for subsequent datagram transmissions */
  62.  
  63. /*
  64.  * Primitives used for Connection-Oriented Service
  65.  */
  66. #define DL_CONNECT_REQ        0x0d    /* Connect request */
  67. #define DL_CONNECT_IND        0x0e    /* Incoming connect indication */
  68. #define DL_CONNECT_RES        0x0f    /* Accept previous connect indication */
  69. #define DL_CONNECT_CON        0x10    /* Connection established */
  70.  
  71. #define DL_TOKEN_REQ        0x11    /* Passoff token request */
  72. #define DL_TOKEN_ACK        0x12    /* Passoff token ack */
  73.  
  74. #define DL_DISCONNECT_REQ    0x13    /* Disconnect request */
  75. #define DL_DISCONNECT_IND    0x14    /* Disconnect indication */
  76.  
  77. #define DL_RESET_REQ        0x17    /* Reset service request */
  78. #define DL_RESET_IND        0x18    /* Incoming reset indication */
  79. #define DL_RESET_RES        0x19    /* Complete reset processing */
  80. #define DL_RESET_CON        0x1a    /* Reset processing complete */
  81.  
  82. /*
  83.  *    Primitives used for Acknowledged Connectionless Service
  84.  */
  85.  
  86. #define DL_DATA_ACK_REQ             0x21    /* data unit transmission request */
  87. #define DL_DATA_ACK_IND             0x22    /* Arrival of a command PDU */
  88. #define DL_DATA_ACK_STATUS_IND        0x23    /* Status indication of DATA_ACK_REQ*/
  89. #define DL_REPLY_REQ                0x24    /* Request a DLSDU from the remote */
  90. #define DL_REPLY_IND                0x25    /* Arrival of a command PDU */
  91. #define DL_REPLY_STATUS_IND         0x26    /* Status indication of REPLY_REQ */
  92. #define DL_REPLY_UPDATE_REQ         0x27    /* Hold a DLSDU for transmission */
  93. #define DL_REPLY_UPDATE_STATUS_IND    0x28     /* Status of REPLY_UPDATE req */
  94.  
  95. /*
  96.  * Primitives used for XID and TEST operations
  97.  */
  98.  
  99. #define DL_XID_REQ        0x29        /* Request to send an XID PDU */
  100. #define DL_XID_IND        0x2a        /* Arrival of an XID PDU */
  101. #define DL_XID_RES        0x2b        /* request to send a response XID PDU*/
  102. #define DL_XID_CON        0x2c        /* Arrival of a response XID PDU */
  103. #define DL_TEST_REQ     0x2d        /* TEST command request */
  104. #define DL_TEST_IND     0x2e        /* TEST response indication */
  105. #define DL_TEST_RES     0x2f        /* TEST response */
  106. #define DL_TEST_CON     0x30        /* TEST Confirmation */
  107.  
  108. /*
  109.  * Primitives to get and set the physical address, and to get
  110.  * Statistics
  111.  */
  112.  
  113. #define DL_PHYS_ADDR_REQ        0x31    /* Request to get physical addr */
  114. #define DL_PHYS_ADDR_ACK        0x32    /* Return physical addr */
  115. #define DL_SET_PHYS_ADDR_REQ    0x33    /* set physical addr */
  116. #define DL_GET_STATISTICS_REQ    0x34    /* Request to get statistics */
  117. #define DL_GET_STATISTICS_ACK    0x35    /* Return statistics */
  118.  
  119. /*
  120.  * DLPI interface states
  121.  */
  122. #define DL_UNATTACHED            0x04    /* PPA not attached */
  123. #define DL_ATTACH_PENDING        0x05    /* Waiting ack of DL_ATTACH_REQ */
  124. #define DL_DETACH_PENDING        0x06    /* Waiting ack of DL_DETACH_REQ */
  125. #define DL_UNBOUND                0x00    /* PPA attached, LLI compatibility */
  126. #define DL_BIND_PENDING         0x01    /* Waiting ack of DL_BIND_REQ, LLI compatibility */
  127. #define DL_UNBIND_PENDING        0x02    /* Waiting ack of DL_UNBIND_REQ, LLI compatibility */
  128. #define DL_IDLE                 0x03    /* dlsap bound, awaiting use, LLI compatibility */
  129. #define DL_UDQOS_PENDING        0x07    /* Waiting ack of DL_UDQOS_REQ */
  130. #define DL_OUTCON_PENDING        0x08    /* outgoing connection, awaiting DL_CONN_CON */
  131. #define DL_INCON_PENDING        0x09    /* incoming connection, awaiting DL_CONN_RES */
  132. #define DL_CONN_RES_PENDING     0x0a    /* Waiting ack of DL_CONNECT_RES */
  133. #define DL_DATAXFER             0x0b    /* connection-oriented data transfer */
  134. #define DL_USER_RESET_PENDING    0x0c    /* user initiated reset, awaiting DL_RESET_CON */
  135. #define DL_PROV_RESET_PENDING    0x0d    /* provider initiated reset, awaiting DL_RESET_RES */
  136. #define DL_RESET_RES_PENDING    0x0e    /* Waiting ack of DL_RESET_RES */
  137. #define DL_DISCON8_PENDING        0x0f    /* Waiting ack of DL_DISC_REQ when in DL_OUTCON_PENDING */
  138. #define DL_DISCON9_PENDING        0x10    /* Waiting ack of DL_DISC_REQ when in DL_INCON_PENDING */
  139. #define DL_DISCON11_PENDING     0x11    /* Waiting ack of DL_DISC_REQ when in DL_DATAXFER */
  140. #define DL_DISCON12_PENDING     0x12    /* Waiting ack of DL_DISC_REQ when in DL_USER_RESET_PENDING */
  141. #define DL_DISCON13_PENDING     0x13    /* Waiting ack of DL_DISC_REQ when in DL_DL_PROV_RESET_PENDING */
  142. #define DL_SUBS_BIND_PND        0x14    /* Waiting ack of DL_SUBS_BIND_REQ */
  143. #define DL_SUBS_UNBIND_PND        0x15    /* Waiting ack of DL_SUBS_UNBIND_REQ */
  144.  
  145. /*
  146.  * DL_ERROR_ACK error return values
  147.  */
  148. #define DL_ACCESS        0x02    /* Improper permissions for request, LLI compatibility */
  149. #define DL_BADADDR        0x01    /* DLSAP address in improper format or invalid */
  150. #define DL_BADCORR        0x05    /* Sequence number not from outstanding DL_CONN_IND */
  151. #define DL_BADDATA        0x06    /* User data exceeded provider limit */
  152. #define DL_BADPPA        0x08    /* Specified PPA was invalid */
  153. #define DL_BADPRIM        0x09    /* Primitive received is not known by DLS provider */
  154. #define DL_BADQOSPARAM    0x0a    /* QOS parameters contained invalid values */
  155. #define DL_BADQOSTYPE    0x0b    /* QOS structure type is unknown or unsupported */
  156. #define DL_BADSAP        0x00    /* Bad LSAP selector, LLI compatibility */
  157. #define DL_BADTOKEN     0x0c    /* Token used not associated with an active stream */
  158. #define DL_BOUND        0x0d    /* Attempted second bind with dl_max_conind or    */
  159.                                 /*    dl_conn_mgmt > 0 on same DLSAP or PPA */
  160. #define DL_INITFAILED    0x0e    /* Physical Link initialization failed */
  161. #define DL_NOADDR        0x0f    /* Provider couldn't allocate alternate address */
  162. #define DL_NOTINIT        0x10    /* Physical Link not initialized */
  163. #define DL_OUTSTATE     0x03    /* Primitive issued in improper state, LLI compatibility */
  164. #define DL_SYSERR        0x04    /* UNIX system error occurred, LLI compatibility */
  165. #define DL_UNSUPPORTED    0x07    /* Requested service not supplied by provider */
  166. #define DL_UNDELIVERABLE 0x11    /* Previous data unit could not be delivered */
  167. #define DL_NOTSUPPORTED  0x12    /* Primitive is known but not supported by DLS provider */
  168. #define DL_TOOMANY        0x13    /* limit exceeded    */
  169. #define DL_NOTENAB        0x14    /* Promiscuous mode not enabled */
  170. #define DL_BUSY         0x15    /* Other streams for a particular PPA in the
  171.                                      post-attached state */
  172.  
  173. #define DL_NOAUTO        0x16    /* Automatic handling of XID & TEST responses
  174.                                    not supported */
  175. #define DL_NOXIDAUTO    0x17    /* Automatic handling of XID not supported */
  176. #define DL_NOTESTAUTO    0x18    /* Automatic handling of TEST not supported */
  177. #define DL_XIDAUTO        0x19    /* Automatic handling of XID response */
  178. #define DL_TESTAUTO     0x1a    /* AUtomatic handling of TEST response*/
  179. #define DL_PENDING        0x1b    /* pending outstanding connect indications */
  180.  
  181. /*
  182.  * DLPI media types supported
  183.  */
  184. #define DL_CSMACD    0x0     /* IEEE 802.3 CSMA/CD network, LLI Compatibility */
  185. #define DL_TPB        0x1     /* IEEE 802.4 Token Passing Bus, LLI Compatibility */
  186. #define DL_TPR        0x2     /* IEEE 802.5 Token Passing Ring, LLI Compatibility */
  187. #define DL_METRO    0x3     /* IEEE 802.6 Metro Net, LLI Compatibility */
  188. #define DL_ETHER    0x4     /* Ethernet Bus, LLI Compatibility */
  189. #define DL_HDLC     0x05    /* ISO HDLC protocol support, bit synchronous */
  190. #define DL_CHAR     0x06    /* Character Synchronous protocol support, eg BISYNC */
  191. #define DL_CTCA     0x07    /* IBM Channel-to-Channel Adapter */
  192. #define DL_FDDI     0x08    /* Fiber Distributed data interface */
  193. #define DL_OTHER    0x09    /* Any other medium not listed above */
  194.  
  195. /*
  196.  * DLPI provider service supported.
  197.  * These must be allowed to be bitwise-OR for dl_service_mode in
  198.  * DL_INFO_ACK.
  199.  */
  200. #define DL_CODLS    0x01    /* support connection-oriented service */
  201. #define DL_CLDLS    0x02    /* support connectionless data link service */
  202. #define DL_ACLDLS    0x04    /* support acknowledged connectionless service*/
  203.  
  204. /*
  205.  * DLPI provider style.
  206.  * The DLPI provider style which determines whether a provider
  207.  * requires a DL_ATTACH_REQ to inform the provider which PPA
  208.  * user messages should be sent/received on.
  209.  */
  210. #define DL_STYLE1    0x0500    /* PPA is implicitly bound by open(2) */
  211. #define DL_STYLE2    0x0501    /* PPA must be explicitly bound via DL_ATTACH_REQ */
  212.  
  213. /*
  214.  * DLPI Originator for Disconnect and Resets
  215.  */
  216. #define DL_PROVIDER     0x0700
  217. #define DL_USER         0x0701
  218.  
  219. /*
  220.  * DLPI Disconnect Reasons
  221.  */
  222. #define DL_CONREJ_DEST_UNKNOWN                0x0800
  223. #ifndef VMS
  224. #define DL_CONREJ_DEST_UNREACH_PERMANENT    0x0801
  225. #define DL_CONREJ_DEST_UNREACH_TRANSIENT    0x0802
  226. #else
  227. #define DL_CONREJ_DEST_UNREACH_PERMANEN     0x0801
  228. #define DL_CONREJ_DEST_UNREACH_TRANSIEN     0x0802
  229. #endif
  230. #define DL_CONREJ_QOS_UNAVAIL_PERMANENT     0x0803
  231. #define DL_CONREJ_QOS_UNAVAIL_TRANSIENT     0x0804
  232. #define DL_CONREJ_PERMANENT_COND            0x0805
  233. #define DL_CONREJ_TRANSIENT_COND            0x0806
  234. #define DL_DISC_ABNORMAL_CONDITION            0x0807
  235. #define DL_DISC_NORMAL_CONDITION            0x0808
  236. #define DL_DISC_PERMANENT_CONDITION         0x0809
  237. #define DL_DISC_TRANSIENT_CONDITION         0x080a
  238. #define DL_DISC_UNSPECIFIED                 0x080b
  239.  
  240. /*
  241.  * DLPI Reset Reasons
  242.  */
  243. #define DL_RESET_FLOW_CONTROL    0x0900
  244. #define DL_RESET_LINK_ERROR     0x0901
  245. #define DL_RESET_RESYNCH        0x0902
  246.  
  247. /*
  248.  * DLPI status values for acknowledged connectionless data transfer
  249.  */
  250. #define DL_CMD_MASK     0x0f    /* mask for command portion of status */
  251. #define DL_CMD_OK        0x00    /* Command Accepted */
  252. #define DL_CMD_RS        0x01    /* Unimplemented or inactivated service */
  253. #define DL_CMD_UE        0x05    /* Data Link User interface error */
  254. #define DL_CMD_PE        0x06    /* Protocol error */
  255. #define DL_CMD_IP        0x07    /* Permanent implementation dependent error*/
  256. #define DL_CMD_UN        0x09    /* Resources temporarily unavailable */
  257. #define DL_CMD_IT        0x0f    /* Temporary implementation dependent error */
  258. #define DL_RSP_MASK     0xf0    /* mask for response portion of status */
  259. #define DL_RSP_OK        0x00    /* Response DLSDU present */
  260. #define DL_RSP_RS        0x10    /* Unimplemented or inactivated service */
  261. #define DL_RSP_NE        0x30    /* Response DLSDU never submitted */
  262. #define DL_RSP_NR        0x40    /* Response DLSDU not requested */
  263. #define DL_RSP_UE        0x50    /* Data Link User interface error */
  264. #define DL_RSP_IP        0x70    /* Permanent implementation dependent error */
  265. #define DL_RSP_UN        0x90    /* Resources temporarily unavailable */
  266. #define DL_RSP_IT        0xf0    /* Temporary implementation dependent error */
  267.  
  268. /*
  269.  * Service Class values for acknowledged connectionless data transfer
  270.  */
  271. #define DL_RQST_RSP     0x01    /* Use acknowledge capability in MAC sublayer*/
  272. #define DL_RQST_NORSP    0x02    /* No acknowledgement service requested */
  273.  
  274. /*
  275.  * DLPI address type definition
  276.  */
  277. #define DL_FACT_PHYS_ADDR    0x01    /* factory physical address */
  278. #define DL_CURR_PHYS_ADDR    0x02    /* current physical address */
  279.  
  280. /*
  281.  * DLPI flag definitions
  282.  */
  283. #define DL_POLL_FINAL    0x01        /* if set,indicates poll/final bit set*/
  284.  
  285. /*
  286.  *    XID and TEST responses supported by the provider
  287.  */
  288. #define DL_AUTO_XID     0x01        /* provider will respond to XID */
  289. #define DL_AUTO_TEST    0x02        /* provider will respond to TEST */
  290.  
  291. /*
  292.  * Subsequent bind type
  293.  */
  294. #define DL_PEER_BIND            0x01    /* subsequent bind on a peer addr */
  295. #define DL_HIERARCHICAL_BIND    0x02    /* subs_bind on a hierarchical addr*/
  296.  
  297. /*
  298.  * DLPI promiscuous mode definitions
  299.  */
  300. #define DL_PROMISC_PHYS     0x01    /* promiscuous mode at phys level */
  301. #define DL_PROMISC_SAP        0x02    /* promiscous mode at sap level */
  302. #define DL_PROMISC_MULTI    0x03    /* promiscuous mode for multicast */
  303.  
  304. /*
  305.  * DLPI Quality Of Service definition for use in QOS structure definitions.
  306.  * The QOS structures are used in connection establishment, DL_INFO_ACK,
  307.  * and setting connectionless QOS values.
  308.  */
  309.  
  310. /*
  311.  * Throughput
  312.  *
  313.  * This parameter is specified for both directions.
  314.  */
  315. typedef struct 
  316. {
  317.         SInt32    dl_target_value;    /* desired bits/second desired */
  318.         SInt32    dl_accept_value;    /* min. acceptable bits/second */
  319. } dl_through_t;
  320.  
  321. /*
  322.  * transit delay specification
  323.  *
  324.  * This parameter is specified for both directions.
  325.  * expressed in milliseconds assuming a DLSDU size of 128 octets.
  326.  * The scaling of the value to the current DLSDU size is provider dependent.
  327.  */
  328. typedef struct 
  329. {
  330.         SInt32    dl_target_value;    /* desired value of service */
  331.         SInt32    dl_accept_value;    /* min. acceptable value of service */
  332. } dl_transdelay_t;
  333.  
  334. /*
  335.  * priority specification
  336.  * priority range is 0-100, with 0 being highest value.
  337.  */
  338. typedef struct 
  339. {
  340.         SInt32    dl_min;
  341.         SInt32    dl_max;
  342. } dl_priority_t;
  343.  
  344. /*
  345.  * protection specification
  346.  *
  347.  */
  348. #define DL_NONE         0x0B01    /* no protection supplied */
  349. #define DL_MONITOR        0x0B02    /* protection against passive monitoring */
  350. #define DL_MAXIMUM        0x0B03    /* protection against modification, replay, */
  351.                                 /* addition, or deletion */
  352.  
  353. typedef struct 
  354. {
  355.         SInt32    dl_min;
  356.         SInt32    dl_max;
  357. } dl_protect_t;
  358.  
  359. /*
  360.  * Resilience specification
  361.  * probabilities are scaled by a factor of 10,000 with a time interval
  362.  * of 10,000 seconds.
  363.  */
  364. typedef struct 
  365. {
  366.         SInt32    dl_disc_prob;    /* probability of provider init DISC */
  367.         SInt32    dl_reset_prob;    /* probability of provider init RESET */
  368. } dl_resilience_t;
  369.  
  370. /*
  371.  * QOS type definition to be used for negotiation with the
  372.  * remote end of a connection, or a connectionless unitdata request.
  373.  * There are two type definitions to handle the negotiation 
  374.  * process at connection establishment. The typedef dl_qos_range_t
  375.  * is used to present a range for parameters. This is used
  376.  * in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
  377.  * dl_qos_sel_t is used to select a specific value for the QOS
  378.  * parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
  379.  * and DL_INFO_ACK messages to define the selected QOS parameters
  380.  * for a connection.
  381.  *
  382.  * NOTE
  383.  *    A DataLink provider which has unknown values for any of the fields
  384.  *    will use a value of DL_UNKNOWN for all values in the fields.
  385.  *
  386.  * NOTE
  387.  *    A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
  388.  *    provider the user requesting this value doesn't care 
  389.  *    what the QOS parameter is set to. This value becomes the
  390.  *    least possible value in the range of QOS parameters.
  391.  *    The order of the QOS parameter range is then:
  392.  *
  393.  *        DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
  394.  */
  395. #define DL_UNKNOWN        -1
  396. #define DL_QOS_DONT_CARE    -2
  397.  
  398. /*
  399.  * Every QOS structure has the first 4 bytes containing a type
  400.  * field, denoting the definition of the rest of the structure.
  401.  * This is used in the same manner has the dl_primitive variable
  402.  * is in messages.
  403.  *
  404.  * The following list is the defined QOS structure type values and structures.
  405.  */
  406. #define DL_QOS_CO_RANGE1    0x0101    /* QOS range struct. for Connection modeservice */
  407. #define DL_QOS_CO_SEL1        0x0102    /* QOS selection structure */
  408. #define DL_QOS_CL_RANGE1    0x0103    /* QOS range struct. for connectionless*/
  409. #define DL_QOS_CL_SEL1        0x0104    /* QOS selection for connectionless mode*/
  410.  
  411. typedef struct 
  412. {
  413.         UInt32            dl_qos_type;
  414.         dl_through_t    dl_rcv_throughput;    /* desired and acceptable*/
  415.         dl_transdelay_t dl_rcv_trans_delay; /* desired and acceptable*/
  416.         dl_through_t    dl_xmt_throughput;
  417.         dl_transdelay_t dl_xmt_trans_delay;
  418.         dl_priority_t    dl_priority;        /* min and max values */
  419.         dl_protect_t    dl_protection;        /* min and max values */
  420.         SInt32            dl_residual_error;
  421.         dl_resilience_t dl_resilience;
  422. }    dl_qos_co_range1_t;
  423.  
  424. typedef struct 
  425. {
  426.         UInt32            dl_qos_type;
  427.         SInt32            dl_rcv_throughput;
  428.         SInt32            dl_rcv_trans_delay;
  429.         SInt32            dl_xmt_throughput;
  430.         SInt32            dl_xmt_trans_delay;
  431.         SInt32            dl_priority;
  432.         SInt32            dl_protection;
  433.         SInt32            dl_residual_error;
  434.         dl_resilience_t    dl_resilience;
  435. }    dl_qos_co_sel1_t;
  436.  
  437. typedef struct 
  438. {
  439.         UInt32            dl_qos_type;
  440.         dl_transdelay_t dl_trans_delay;
  441.         dl_priority_t    dl_priority;
  442.         dl_protect_t    dl_protection;
  443.         SInt32            dl_residual_error;
  444. }    dl_qos_cl_range1_t;
  445.  
  446. typedef struct 
  447. {
  448.         UInt32        dl_qos_type;
  449.         SInt32        dl_trans_delay;
  450.         SInt32        dl_priority;
  451.         SInt32        dl_protection;
  452.         SInt32        dl_residual_error;
  453. }    dl_qos_cl_sel1_t;
  454.  
  455. /*
  456.  * DLPI interface primitive definitions.
  457.  *
  458.  * Each primitive is sent as a stream message.    It is possible that
  459.  * the messages may be viewed as a sequence of bytes that have the
  460.  * following form without any padding. The structure definition
  461.  * of the following messages may have to change depending on the
  462.  * underlying hardware architecture and crossing of a hardware
  463.  * boundary with a different hardware architecture.
  464.  *
  465.  * Fields in the primitives having a name of the form
  466.  * dl_reserved cannot be used and have the value of
  467.  * binary zero, no bits turned on.
  468.  *
  469.  * Each message has the name defined followed by the
  470.  * stream message type (M_PROTO, M_PCPROTO, M_DATA)
  471.  */
  472.  
  473. /*
  474.  *    LOCAL MANAGEMENT SERVICE PRIMITIVES
  475.  */
  476.  
  477. /*
  478.  * DL_INFO_REQ, M_PCPROTO type
  479.  */
  480. typedef struct 
  481. {
  482.     UInt32    dl_primitive;            /* set to DL_INFO_REQ */
  483. } dl_info_req_t;
  484.  
  485. /*
  486.  * DL_INFO_ACK, M_PCPROTO type
  487.  */
  488. typedef struct 
  489. {
  490.     UInt32        dl_primitive;            /* set to DL_INFO_ACK */
  491.     UInt32        dl_max_sdu;             /* Max bytes in a DLSDU */
  492.     UInt32        dl_min_sdu;             /* Min bytes in a DLSDU */
  493.     UInt32        dl_addr_length;         /* length of DLSAP address */
  494.     UInt32        dl_mac_type;            /* type of medium supported*/
  495.     UInt32        dl_reserved;            /* value set to zero */
  496.     UInt32        dl_current_state;        /* state of DLPI interface */
  497.     SInt32        dl_sap_length;            /* current length of SAP part of
  498.                                            dlsap address */
  499.     UInt32        dl_service_mode;        /* CO, CL or ACL */
  500.     UInt32        dl_qos_length;            /* length of qos values */
  501.     UInt32        dl_qos_offset;            /* offset from beg. of block*/
  502.     UInt32        dl_qos_range_length;    /* available range of qos */
  503.     UInt32        dl_qos_range_offset;    /* offset from beg. of block*/
  504.     UInt32        dl_provider_style;        /* style1 or style2 */
  505.     UInt32        dl_addr_offset;         /* offset of the dlsap addr */
  506.     UInt32        dl_version;             /* version number */
  507.     UInt32        dl_brdcst_addr_length;    /* length of broadcast addr */
  508.     UInt32        dl_brdcst_addr_offset;    /* offset from beg. of block*/
  509.     UInt32        dl_growth;                /* set to zero */
  510. } dl_info_ack_t;
  511.  
  512. /*
  513.  * DL_ATTACH_REQ, M_PROTO type
  514.  */
  515. typedef struct 
  516. {
  517.     UInt32        dl_primitive;        /* set to DL_ATTACH_REQ*/
  518.     UInt32        dl_ppa;             /* id of the PPA */
  519. } dl_attach_req_t;
  520.  
  521. /*
  522.  * DL_DETACH_REQ, M_PROTO type
  523.  */
  524. typedef struct 
  525. {
  526.     UInt32    dl_primitive;            /* set to DL_DETACH_REQ */
  527. } dl_detach_req_t;
  528.  
  529. /*
  530.  * DL_BIND_REQ, M_PROTO type
  531.  */
  532. typedef struct 
  533. {
  534.     UInt32    dl_primitive;        /* set to DL_BIND_REQ */
  535.     UInt32    dl_sap;             /* info to identify dlsap addr*/
  536.     UInt32    dl_max_conind;        /* max # of outstanding con_ind*/
  537.     UInt16    dl_service_mode;    /* CO, CL or ACL */     
  538.     UInt16    dl_conn_mgmt;        /* if non-zero, is con-mgmt stream*/
  539.     UInt32    dl_xidtest_flg;     /* if set to 1 indicates automatic
  540.                                    initiation of test and xid frames */
  541. } dl_bind_req_t;
  542.  
  543. /*
  544.  * DL_BIND_ACK, M_PCPROTO type
  545.  */
  546. typedef struct 
  547. {
  548.     UInt32    dl_primitive;        /* DL_BIND_ACK */
  549.     UInt32    dl_sap;             /* DLSAP addr info */
  550.     UInt32    dl_addr_length;     /* length of complete DLSAP addr */
  551.     UInt32    dl_addr_offset;     /* offset from beginning of M_PCPROTO*/
  552.     UInt32    dl_max_conind;        /* allowed max. # of con-ind */
  553.     UInt32    dl_xidtest_flg;     /* responses supported by provider*/
  554. } dl_bind_ack_t;
  555.  
  556. /*
  557.  * DL_SUBS_BIND_REQ, M_PROTO type
  558.  */
  559. typedef struct 
  560. {
  561.     UInt32    dl_primitive;            /* DL_SUBS_BIND_REQ */
  562.     UInt32    dl_subs_sap_offset;     /* offset of subs_sap */
  563.     UInt32    dl_subs_sap_length;     /* length of subs_sap */
  564.     UInt32    dl_subs_bind_class;     /* peer or hierarchical */
  565. } dl_subs_bind_req_t;
  566.  
  567. /*
  568.  * DL_SUBS_BIND_ACK, M_PCPROTO type
  569.  */
  570. typedef struct 
  571. {
  572.     UInt32 dl_primitive;         /* DL_SUBS_BIND_ACK */
  573.     UInt32 dl_subs_sap_offset;    /* offset of subs_sap */
  574.     UInt32 dl_subs_sap_length;    /* length of subs_sap */
  575. } dl_subs_bind_ack_t;
  576.  
  577. /*
  578.  * DL_UNBIND_REQ, M_PROTO type
  579.  */
  580. typedef struct 
  581. {
  582.     UInt32    dl_primitive;        /* DL_UNBIND_REQ */
  583. } dl_unbind_req_t;
  584.  
  585. /*
  586.  * DL_SUBS_UNBIND_REQ, M_PROTO type
  587.  */
  588. typedef struct 
  589. {
  590.     UInt32    dl_primitive;            /* DL_SUBS_UNBIND_REQ */
  591.     UInt32    dl_subs_sap_offset;     /* offset of subs_sap */
  592.     UInt32    dl_subs_sap_length;     /* length of subs_sap */
  593. } dl_subs_unbind_req_t;
  594.  
  595. /*
  596.  * DL_OK_ACK, M_PCPROTO type
  597.  */
  598. typedef struct 
  599. {
  600.     UInt32    dl_primitive;            /* DL_OK_ACK */
  601.     UInt32    dl_correct_primitive;    /* primitive being acknowledged */
  602. } dl_ok_ack_t;
  603.  
  604. /*
  605.  * DL_ERROR_ACK, M_PCPROTO type
  606.  */
  607. typedef struct 
  608. {
  609.     UInt32    dl_primitive;            /* DL_ERROR_ACK */
  610.     UInt32    dl_error_primitive;     /* primitive in error */
  611.     UInt32    dl_errno;                /* DLPI error code */
  612.     UInt32    dl_unix_errno;            /* UNIX system error code */
  613. } dl_error_ack_t;
  614.  
  615. /*
  616.  * DL_ENABMULTI_REQ, M_PROTO type
  617.  */
  618. typedef struct 
  619. {
  620.     UInt32    dl_primitive;        /* DL_ENABMULTI_REQ */
  621.     UInt32    dl_addr_length;     /* length of multicast address */
  622.     UInt32    dl_addr_offset;     /* offset from beg. of M_PROTO block*/
  623. } dl_enabmulti_req_t;
  624.  
  625. /*
  626.  * DL_DISABMULTI_REQ, M_PROTO type
  627.  */
  628.  
  629. typedef struct 
  630. {
  631.     UInt32    dl_primitive;        /* DL_DISABMULTI_REQ */
  632.     UInt32    dl_addr_length;     /* length of multicast address */
  633.     UInt32    dl_addr_offset;     /* offset from beg. of M_PROTO block*/
  634. } dl_disabmulti_req_t;
  635.  
  636. /*
  637.  * DL_PROMISCON_REQ, M_PROTO type
  638.  */
  639.  
  640. typedef struct 
  641. {
  642.     UInt32    dl_primitive;        /* DL_PROMISCON_REQ */
  643.     UInt32    dl_level;            /* physical,SAP level or ALL multicast*/
  644. } dl_promiscon_req_t;
  645.  
  646. /*
  647.  * DL_PROMISCOFF_REQ, M_PROTO type
  648.  */
  649.  
  650. typedef struct 
  651. {
  652.     UInt32    dl_primitive;        /* DL_PROMISCOFF_REQ */
  653.     UInt32    dl_level;            /* Physical,SAP level or ALL multicast*/
  654. } dl_promiscoff_req_t;
  655.  
  656. /*
  657.  *    Primitives to get and set the Physical address
  658.  */
  659.  
  660. /*
  661.  * DL_PHYS_ADDR_REQ, M_PROTO type
  662.  */
  663. typedef struct 
  664. {
  665.     UInt32    dl_primitive;        /* DL_PHYS_ADDR_REQ */
  666.     UInt32    dl_addr_type;        /* factory or current physical addr */
  667. } dl_phys_addr_req_t;
  668.  
  669. /*
  670.  * DL_PHYS_ADDR_ACK, M_PCPROTO type
  671.  */
  672. typedef struct 
  673. {
  674.     UInt32    dl_primitive;        /* DL_PHYS_ADDR_ACK */
  675.     UInt32    dl_addr_length;     /* length of the physical addr */
  676.     UInt32    dl_addr_offset;     /* offset from beg. of block */
  677. } dl_phys_addr_ack_t;
  678.  
  679. /*
  680.  * DL_SET_PHYS_ADDR_REQ, M_PROTO type
  681.  */
  682. typedef struct 
  683. {
  684.     UInt32    dl_primitive;        /* DL_SET_PHYS_ADDR_REQ */
  685.     UInt32    dl_addr_length;     /* length of physical addr */
  686.     UInt32    dl_addr_offset;     /* offset from beg. of block */
  687. } dl_set_phys_addr_req_t;
  688.  
  689. /*
  690.  *    Primitives to get statistics
  691.  */
  692.  
  693. /*
  694.  * DL_GET_STATISTICS_REQ, M_PROTO type
  695.  */
  696. typedef struct 
  697. {
  698.     UInt32    dl_primitive;        /* DL_GET_STATISTICS_REQ */
  699. } dl_get_statistics_req_t;
  700.  
  701. /*
  702.  * DL_GET_STATISTICS_ACK, M_PCPROTO type
  703.  */
  704. typedef struct 
  705. {
  706.     UInt32    dl_primitive;        /* DL_GET_STATISTICS_ACK */
  707.     UInt32    dl_stat_length;     /* length of statistics structure*/
  708.     UInt32    dl_stat_offset;     /* offset from beg. of block */
  709. } dl_get_statistics_ack_t;
  710.  
  711. /*
  712.  *    CONNECTION-ORIENTED SERVICE PRIMITIVES
  713.  */
  714.  
  715. /*
  716.  * DL_CONNECT_REQ, M_PROTO type
  717.  */
  718. typedef struct 
  719. {
  720.     UInt32    dl_primitive;            /* DL_CONNECT_REQ */
  721.     UInt32    dl_dest_addr_length;    /* len. of dlsap addr*/
  722.     UInt32    dl_dest_addr_offset;    /* offset */
  723.     UInt32    dl_qos_length;            /* len. of QOS parm val*/
  724.     UInt32    dl_qos_offset;            /* offset */
  725.     UInt32    dl_growth;                /* set to zero */
  726. } dl_connect_req_t;
  727.  
  728. /*
  729.  * DL_CONNECT_IND, M_PROTO type
  730.  */
  731. typedef struct 
  732. {
  733.     UInt32    dl_primitive;            /* DL_CONNECT_IND */
  734.     UInt32    dl_correlation;         /* provider's correlation token*/
  735.     UInt32    dl_called_addr_length;    /* length of called address */
  736.     UInt32    dl_called_addr_offset;    /* offset from beginning of block */
  737.     UInt32    dl_calling_addr_length; /* length of calling address */
  738.     UInt32    dl_calling_addr_offset; /* offset from beginning of block */
  739.     UInt32    dl_qos_length;            /* length of qos structure */
  740.     UInt32    dl_qos_offset;            /* offset from beginning of block */
  741.     UInt32    dl_growth;                /* set to zero */
  742. } dl_connect_ind_t;
  743.  
  744. /*
  745.  * DL_CONNECT_RES, M_PROTO type
  746.  */
  747. typedef struct 
  748. {
  749.     UInt32    dl_primitive;    /* DL_CONNECT_RES */
  750.     UInt32    dl_correlation; /* provider's correlation token */
  751.     UInt32    dl_resp_token;    /* token associated with responding stream */
  752.     UInt32    dl_qos_length;    /* length of qos structure */
  753.     UInt32    dl_qos_offset;    /* offset from beginning of block */
  754.     UInt32    dl_growth;        /* set to zero */
  755. } dl_connect_res_t;
  756.  
  757. /*
  758.  * DL_CONNECT_CON, M_PROTO type
  759.  */
  760. typedef struct 
  761. {
  762.     UInt32    dl_primitive;            /* DL_CONNECT_CON*/
  763.     UInt32    dl_resp_addr_length;    /* length of responder's address */
  764.     UInt32    dl_resp_addr_offset;    /* offset from beginning of block*/
  765.     UInt32    dl_qos_length;            /* length of qos structure */
  766.     UInt32    dl_qos_offset;            /* offset from beginning of block*/
  767.     UInt32    dl_growth;                /* set to zero */
  768. } dl_connect_con_t;
  769.  
  770. /*
  771.  * DL_TOKEN_REQ, M_PCPROTO type
  772.  */
  773. typedef struct 
  774. {
  775.     UInt32    dl_primitive;        /* DL_TOKEN_REQ */
  776. } dl_token_req_t;
  777.  
  778. /*
  779.  * DL_TOKEN_ACK, M_PCPROTO type
  780.  */
  781. typedef struct 
  782. {
  783.     UInt32    dl_primitive;    /* DL_TOKEN_ACK */
  784.     UInt32    dl_token;        /* Connection response token associated
  785.                                with the stream */
  786. }dl_token_ack_t;
  787.  
  788. /*
  789.  * DL_DISCONNECT_REQ, M_PROTO type
  790.  */
  791. typedef struct 
  792. {
  793.     UInt32        dl_primitive;    /* DL_DISCONNECT_REQ */
  794.     UInt32        dl_reason;        /*normal, abnormal, perm. or transient*/
  795.     UInt32        dl_correlation; /* association with connect_ind */
  796. } dl_disconnect_req_t;
  797.  
  798. /*
  799.  * DL_DISCONNECT_IND, M_PROTO type
  800.  */
  801. typedef struct 
  802. {
  803.     UInt32    dl_primitive;        /* DL_DISCONNECT_IND */
  804.     UInt32    dl_originator;        /* USER or PROVIDER */
  805.     UInt32    dl_reason;            /* permanent or transient */
  806.     UInt32    dl_correlation;     /* association with connect_ind */
  807. } dl_disconnect_ind_t;
  808.  
  809. /*
  810.  * DL_RESET_REQ, M_PROTO type
  811.  */
  812. typedef struct 
  813. {
  814.     UInt32    dl_primitive;        /* DL_RESET_REQ */
  815. } dl_reset_req_t;
  816.  
  817. /*
  818.  * DL_RESET_IND, M_PROTO type
  819.  */
  820. typedef struct 
  821. {
  822.     UInt32    dl_primitive;        /* DL_RESET_IND */
  823.     UInt32    dl_originator;        /* Provider or User */
  824.     UInt32    dl_reason;            /* flow control, link error or resynch*/
  825. } dl_reset_ind_t;
  826.  
  827. /*
  828.  * DL_RESET_RES, M_PROTO type
  829.  */
  830. typedef struct 
  831. {
  832.     UInt32    dl_primitive;        /* DL_RESET_RES */
  833. } dl_reset_res_t;
  834.  
  835. /*
  836.  * DL_RESET_CON, M_PROTO type
  837.  */
  838. typedef struct 
  839. {
  840.     UInt32    dl_primitive;        /* DL_RESET_CON */
  841. } dl_reset_con_t;
  842.  
  843. /*
  844.  *    CONNECTIONLESS SERVICE PRIMITIVES
  845.  */
  846.  
  847. /*
  848.  * DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)
  849.  */
  850. typedef struct 
  851. {
  852.     UInt32    dl_primitive;            /* DL_UNITDATA_REQ */
  853.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  854.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  855.     dl_priority_t    dl_priority;    /* priority value */
  856. } dl_unitdata_req_t;
  857.  
  858. /*
  859.  * DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)
  860.  */
  861. typedef struct 
  862. {
  863.     UInt32    dl_primitive;            /* DL_UNITDATA_IND */
  864.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  865.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  866.     UInt32    dl_src_addr_length;     /* DLSAP addr length of sending user*/
  867.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  868.     UInt32    dl_group_address;        /* set to one if multicast/broadcast*/
  869. } dl_unitdata_ind_t;
  870.  
  871. /*
  872.  * DL_UDERROR_IND, M_PROTO type
  873.  *    (or M_PCPROTO type if LLI-based provider)
  874.  */
  875. typedef struct 
  876. {
  877.     UInt32    dl_primitive;            /* DL_UDERROR_IND */
  878.     UInt32    dl_dest_addr_length;    /* Destination DLSAP */
  879.     UInt32    dl_dest_addr_offset;    /* Offset from beg. of block */
  880.     UInt32    dl_unix_errno;            /* unix system error code*/
  881.     UInt32    dl_errno;                /* DLPI error code */
  882. } dl_uderror_ind_t;
  883.  
  884. /*
  885.  * DL_UDQOS_REQ, M_PROTO type
  886.  */
  887. typedef struct 
  888. {
  889.     UInt32    dl_primitive;        /* DL_UDQOS_REQ */
  890.     UInt32    dl_qos_length;        /* length in bytes of requested qos*/
  891.     UInt32    dl_qos_offset;        /* offset from beg. of block */
  892. } dl_udqos_req_t;
  893.  
  894. /*
  895.  *    Primitives to handle XID and TEST operations
  896.  */
  897.  
  898. /*
  899.  * DL_TEST_REQ, M_PROTO type
  900.  */
  901. typedef struct 
  902. {
  903.     UInt32    dl_primitive;            /* DL_TEST_REQ */
  904.     UInt32    dl_flag;                /* poll/final */
  905.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  906.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  907. } dl_test_req_t;
  908.  
  909. /*
  910.  * DL_TEST_IND, M_PROTO type
  911.  */
  912. typedef struct 
  913. {
  914.     UInt32    dl_primitive;            /* DL_TEST_IND */
  915.     UInt32    dl_flag;                /* poll/final */
  916.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  917.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  918.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  919.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  920. } dl_test_ind_t;
  921.  
  922. /*
  923.  *    DL_TEST_RES, M_PROTO type
  924.  */
  925. typedef struct 
  926. {
  927.     UInt32    dl_primitive;            /* DL_TEST_RES */
  928.     UInt32    dl_flag;                /* poll/final */
  929.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  930.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  931. } dl_test_res_t;
  932.  
  933. /*
  934.  *    DL_TEST_CON, M_PROTO type
  935.  */
  936. typedef struct 
  937. {
  938.     UInt32    dl_primitive;            /* DL_TEST_CON */
  939.     UInt32    dl_flag;                /* poll/final */
  940.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  941.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  942.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  943.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  944. } dl_test_con_t;
  945.  
  946. /*
  947.  * DL_XID_REQ, M_PROTO type
  948.  */
  949. typedef struct 
  950. {
  951.     UInt32    dl_primitive;            /* DL_XID_REQ */
  952.     UInt32    dl_flag;                /* poll/final */
  953.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  954.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  955. } dl_xid_req_t;
  956.  
  957. /*
  958.  * DL_XID_IND, M_PROTO type
  959.  */
  960. typedef struct 
  961. {
  962.     UInt32    dl_primitive;            /* DL_XID_IND */
  963.     UInt32    dl_flag;                /* poll/final */
  964.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  965.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  966.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  967.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  968. } dl_xid_ind_t;
  969.  
  970. /*
  971.  *    DL_XID_RES, M_PROTO type
  972.  */
  973. typedef struct 
  974. {
  975.     UInt32    dl_primitive;            /* DL_XID_RES */
  976.     UInt32    dl_flag;                /* poll/final */
  977.     UInt32    dl_dest_addr_length;    /* DLSAP length of dest. user */
  978.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  979. } dl_xid_res_t;
  980.  
  981. /*
  982.  *    DL_XID_CON, M_PROTO type
  983.  */
  984. typedef struct 
  985. {
  986.     UInt32    dl_primitive;            /* DL_XID_CON */
  987.     UInt32    dl_flag;                /* poll/final */
  988.     UInt32    dl_dest_addr_length;    /* dlsap length of dest. user */
  989.     UInt32    dl_dest_addr_offset;    /* offset from beg. of block */
  990.     UInt32    dl_src_addr_length;     /* dlsap length of source user */
  991.     UInt32    dl_src_addr_offset;     /* offset from beg. of block */
  992. } dl_xid_con_t;
  993.  
  994. /*
  995.  *    ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES
  996.  */
  997.  
  998. /*
  999.  * DL_DATA_ACK_REQ, M_PROTO type
  1000.  */
  1001. typedef struct 
  1002. {
  1003.     UInt32    dl_primitive;            /* DL_DATA_ACK_REQ */
  1004.     UInt32    dl_correlation;         /* User's correlation token */
  1005.     UInt32    dl_dest_addr_length;    /* length of destination addr */
  1006.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1007.     UInt32    dl_src_addr_length;     /* length of source address */
  1008.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1009.     UInt32    dl_priority;            /* priority */
  1010.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1011. } dl_data_ack_req_t;
  1012.  
  1013. /*
  1014.  * DL_DATA_ACK_IND, M_PROTO type
  1015.  */
  1016. typedef struct 
  1017. {
  1018.     UInt32    dl_primitive;            /* DL_DATA_ACK_IND */
  1019.     UInt32    dl_dest_addr_length;    /* length of destination addr */
  1020.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1021.     UInt32    dl_src_addr_length;     /* length of source address */
  1022.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1023.     UInt32    dl_priority;            /* priority for data unit transm. */
  1024.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1025. } dl_data_ack_ind_t;
  1026.  
  1027. /*
  1028.  * DL_DATA_ACK_STATUS_IND, M_PROTO type
  1029.  */
  1030. typedef struct 
  1031. {
  1032.     UInt32    dl_primitive;        /* DL_DATA_ACK_STATUS_IND */
  1033.     UInt32    dl_correlation;     /* User's correlation token */
  1034.     UInt32    dl_status;            /* success or failure of previous req*/
  1035. } dl_data_ack_status_ind_t;
  1036.  
  1037. /*
  1038.  * DL_REPLY_REQ, M_PROTO type
  1039.  */
  1040. typedef struct 
  1041. {
  1042.     UInt32    dl_primitive;            /* DL_REPLY_REQ */
  1043.     UInt32    dl_correlation;         /* User's correlation token */
  1044.     UInt32    dl_dest_addr_length;    /* length of destination address */
  1045.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block */
  1046.     UInt32    dl_src_addr_length;     /* source address length */
  1047.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1048.     UInt32    dl_priority;            /* priority for data unit transmission*/
  1049.     UInt32    dl_service_class;
  1050. } dl_reply_req_t;
  1051.  
  1052. /*
  1053.  * DL_REPLY_IND, M_PROTO type
  1054.  */
  1055. typedef struct 
  1056. {
  1057.     UInt32    dl_primitive;            /* DL_REPLY_IND */
  1058.     UInt32    dl_dest_addr_length;    /* length of destination address */
  1059.     UInt32    dl_dest_addr_offset;    /* offset from beginning of block*/
  1060.     UInt32    dl_src_addr_length;     /* length of source address */
  1061.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1062.     UInt32    dl_priority;            /* priority for data unit transmission*/
  1063.     UInt32    dl_service_class;        /* DL_RQST_RSP or DL_RQST_NORSP */
  1064. } dl_reply_ind_t;
  1065.  
  1066. /*
  1067.  * DL_REPLY_STATUS_IND, M_PROTO type
  1068.  */
  1069. typedef struct 
  1070. {
  1071.     UInt32    dl_primitive;        /* DL_REPLY_STATUS_IND */
  1072.     UInt32    dl_correlation;     /* User's correlation token */
  1073.     UInt32    dl_status;            /* success or failure of previous req*/
  1074. } dl_reply_status_ind_t;
  1075.  
  1076. /*
  1077.  * DL_REPLY_UPDATE_REQ, M_PROTO type
  1078.  */
  1079. typedef struct 
  1080. {
  1081.     UInt32    dl_primitive;            /* DL_REPLY_UPDATE_REQ */
  1082.     UInt32    dl_correlation;         /* user's correlation token */
  1083.     UInt32    dl_src_addr_length;     /* length of source address */
  1084.     UInt32    dl_src_addr_offset;     /* offset from beginning of block */
  1085. } dl_reply_update_req_t;
  1086.  
  1087. /*
  1088.  * DL_REPLY_UPDATE_STATUS_IND, M_PROTO type
  1089.  */
  1090. typedef struct 
  1091. {
  1092.     UInt32    dl_primitive;        /* DL_REPLY_UPDATE_STATUS_IND */
  1093.     UInt32    dl_correlation;     /* User's correlation token */
  1094.     UInt32    dl_status;            /* success or failure of previous req*/
  1095. } dl_reply_update_status_ind_t;
  1096.  
  1097. union DL_primitives 
  1098. {
  1099.     UInt32                dl_primitive;
  1100.     dl_info_req_t        info_req;
  1101.     dl_info_ack_t        info_ack;
  1102.     dl_attach_req_t     attach_req;
  1103.     dl_detach_req_t     detach_req;
  1104.     dl_bind_req_t        bind_req;
  1105.     dl_bind_ack_t        bind_ack;
  1106.     dl_unbind_req_t     unbind_req;
  1107.     dl_subs_bind_req_t    subs_bind_req;
  1108.     dl_subs_bind_ack_t    subs_bind_ack;
  1109.     dl_subs_unbind_req_t    subs_unbind_req;
  1110.     dl_ok_ack_t         ok_ack;
  1111.     dl_error_ack_t        error_ack;
  1112.     dl_connect_req_t    connect_req;
  1113.     dl_connect_ind_t    connect_ind;
  1114.     dl_connect_res_t    connect_res;
  1115.     dl_connect_con_t    connect_con;
  1116.     dl_token_req_t        token_req;
  1117.     dl_token_ack_t        token_ack;
  1118.     dl_disconnect_req_t disconnect_req;
  1119.     dl_disconnect_ind_t disconnect_ind;
  1120.     dl_reset_req_t        reset_req;
  1121.     dl_reset_ind_t        reset_ind;
  1122.     dl_reset_res_t        reset_res;
  1123.     dl_reset_con_t        reset_con;
  1124.     dl_unitdata_req_t    unitdata_req;
  1125.     dl_unitdata_ind_t    unitdata_ind;
  1126.     dl_uderror_ind_t    uderror_ind;
  1127.     dl_udqos_req_t        udqos_req;
  1128.     dl_enabmulti_req_t    enabmulti_req;
  1129.     dl_disabmulti_req_t disabmulti_req;
  1130.     dl_promiscon_req_t    promiscon_req;
  1131.     dl_promiscoff_req_t promiscoff_req;
  1132.     dl_phys_addr_req_t    physaddr_req;
  1133.     dl_phys_addr_ack_t    physaddr_ack;
  1134.     dl_set_phys_addr_req_t    set_physaddr_req;
  1135.     dl_get_statistics_req_t get_statistics_req;
  1136.     dl_get_statistics_ack_t get_statistics_ack;
  1137.     dl_test_req_t        test_req;
  1138.     dl_test_ind_t        test_ind;
  1139.     dl_test_res_t        test_res;
  1140.     dl_test_con_t        test_con;
  1141.     dl_xid_req_t        xid_req;
  1142.     dl_xid_ind_t        xid_ind;
  1143.     dl_xid_res_t        xid_res;
  1144.     dl_xid_con_t        xid_con;
  1145.     dl_data_ack_req_t    data_ack_req;
  1146.     dl_data_ack_ind_t    data_ack_ind;
  1147.     dl_data_ack_status_ind_t    data_ack_status_ind;
  1148.     dl_reply_req_t        reply_req;
  1149.     dl_reply_ind_t        reply_ind;
  1150.     dl_reply_status_ind_t    reply_status_ind;
  1151.     dl_reply_update_req_t    reply_update_req;
  1152.     dl_reply_update_status_ind_t    reply_update_status_ind;
  1153. };
  1154.  
  1155. #define DL_INFO_REQ_SIZE    sizeof(dl_info_req_t)
  1156. #define DL_INFO_ACK_SIZE    sizeof(dl_info_ack_t)
  1157. #define DL_ATTACH_REQ_SIZE    sizeof(dl_attach_req_t)
  1158. #define DL_DETACH_REQ_SIZE    sizeof(dl_detach_req_t)
  1159. #define DL_BIND_REQ_SIZE    sizeof(dl_bind_req_t)
  1160. #define DL_BIND_ACK_SIZE    sizeof(dl_bind_ack_t)
  1161. #define DL_UNBIND_REQ_SIZE    sizeof(dl_unbind_req_t)
  1162. #define DL_SUBS_BIND_REQ_SIZE    sizeof(dl_subs_bind_req_t)
  1163. #define DL_SUBS_BIND_ACK_SIZE    sizeof(dl_subs_bind_ack_t)
  1164. #define DL_SUBS_UNBIND_REQ_SIZE sizeof(dl_subs_unbind_req_t)
  1165. #define DL_OK_ACK_SIZE        sizeof(dl_ok_ack_t)
  1166. #define DL_ERROR_ACK_SIZE    sizeof(dl_error_ack_t)
  1167. #define DL_CONNECT_REQ_SIZE     sizeof(dl_connect_req_t)
  1168. #define DL_CONNECT_IND_SIZE     sizeof(dl_connect_ind_t)
  1169. #define DL_CONNECT_RES_SIZE     sizeof(dl_connect_res_t)
  1170. #define DL_CONNECT_CON_SIZE     sizeof(dl_connect_con_t)
  1171. #define DL_TOKEN_REQ_SIZE    sizeof(dl_token_req_t)
  1172. #define DL_TOKEN_ACK_SIZE    sizeof(dl_token_ack_t)
  1173. #define DL_DISCONNECT_REQ_SIZE    sizeof(dl_disconnect_req_t)
  1174. #define DL_DISCONNECT_IND_SIZE    sizeof(dl_disconnect_ind_t)
  1175. #define DL_RESET_REQ_SIZE    sizeof(dl_reset_req_t)
  1176. #define DL_RESET_IND_SIZE    sizeof(dl_reset_ind_t)
  1177. #define DL_RESET_RES_SIZE    sizeof(dl_reset_res_t)
  1178. #define DL_RESET_CON_SIZE    sizeof(dl_reset_con_t)
  1179. #define DL_UNITDATA_REQ_SIZE    sizeof(dl_unitdata_req_t)
  1180. #define DL_UNITDATA_IND_SIZE    sizeof(dl_unitdata_ind_t)
  1181. #define DL_UDERROR_IND_SIZE     sizeof(dl_uderror_ind_t)
  1182. #define DL_UDQOS_REQ_SIZE    sizeof(dl_udqos_req_t)
  1183. #define DL_ENABMULTI_REQ_SIZE    sizeof(dl_enabmulti_req_t)
  1184. #define DL_DISABMULTI_REQ_SIZE    sizeof(dl_disabmulti_req_t)
  1185. #define DL_PROMISCON_REQ_SIZE    sizeof(dl_promiscon_req_t)
  1186. #define DL_PROMISCOFF_REQ_SIZE    sizeof(dl_promiscoff_req_t)
  1187. #define DL_PHYS_ADDR_REQ_SIZE    sizeof(dl_phys_addr_req_t)
  1188. #define DL_PHYS_ADDR_ACK_SIZE    sizeof(dl_phys_addr_ack_t)
  1189. #define DL_SET_PHYS_ADDR_REQ_SIZE    sizeof(dl_set_phys_addr_req_t)
  1190. #define DL_GET_STATISTICS_REQ_SIZE    sizeof(dl_get_statistics_req_t)
  1191. #define DL_GET_STATISTICS_ACK_SIZE    sizeof(dl_get_statistics_ack_t)
  1192. #define DL_XID_REQ_SIZE     sizeof(dl_xid_req_t)
  1193. #define DL_XID_IND_SIZE     sizeof(dl_xid_ind_t)
  1194. #define DL_XID_RES_SIZE     sizeof(dl_xid_res_t)
  1195. #define DL_XID_CON_SIZE     sizeof(dl_xid_con_t)
  1196. #define DL_TEST_REQ_SIZE    sizeof(dl_test_req_t)
  1197. #define DL_TEST_IND_SIZE    sizeof(dl_test_ind_t)
  1198. #define DL_TEST_RES_SIZE    sizeof(dl_test_res_t)
  1199. #define DL_TEST_CON_SIZE    sizeof(dl_test_con_t)
  1200. #define DL_DATA_ACK_REQ_SIZE    sizeof(dl_data_ack_req_t)
  1201. #define DL_DATA_ACK_IND_SIZE    sizeof(dl_data_ack_ind_t)
  1202. #define DL_DATA_ACK_STATUS_IND_SIZE     sizeof(dl_data_ack_status_ind_t)
  1203. #define DL_REPLY_REQ_SIZE    sizeof(dl_reply_req_t)
  1204. #define DL_REPLY_IND_SIZE    sizeof(dl_reply_ind_t)
  1205. #define DL_REPLY_STATUS_IND_SIZE    sizeof(dl_reply_status_ind_t)
  1206. #define DL_REPLY_UPDATE_REQ_SIZE    sizeof(dl_reply_update_req_t)
  1207. #define DL_REPLY_UPDATE_STATUS_IND_SIZE sizeof(dl_reply_update_status_ind_t)
  1208.  
  1209. #ifndef MIOC_CMD
  1210. #include <miioccom.h>
  1211. #endif
  1212.  
  1213. #define DLIOCRAW    MIOC_CMD(MIOC_DLPI,1)        /* M_DATA "raw" mode */
  1214. #define DL_IOC_HDR_INFO MIOC_CMD(MIOC_DLPI,10)        /* ??? */
  1215.  
  1216. #if PRAGMA_ALIGN_SUPPORTED
  1217. #pragma options align=reset
  1218. #endif
  1219.  
  1220. #endif /* _SYS_DLPI_H */
  1221.